package top.hongthorn.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.hongthorn.service.ChaserService;

import java.util.Map;

/**
 * <p>
 * 驱逐舰编队 前端控制器
 * </p>
 *
 * @author 泓宇网络科技工作室
 * @since 2023-12-28 00:47:55
 */
@RestController
@RequestMapping("/chaser")
@Api(value = "ChaserController", tags = "ChaserController")
public class ChaserController {


    @Autowired
    private ChaserService chaserService;

    @ApiOperation(value = "驱逐舰编队数据分页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", dataType = "Integer", example = "1", required = false),
            @ApiImplicitParam(name = "limit", value = "显示条数", dataType = "Integer", example = "3", required = false),
    })
    @RequestMapping(value = "/findChaser", method = RequestMethod.GET)
    public Map findChaser(Integer page, Integer limit) {
        return chaserService.findChaser(page, limit);
    }
}